home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 5 / Amiga Tools 5.iso / grafik / 3d & render tools / irit / contrib / scripts / hershey.irt < prev    next >
Encoding:
Text File  |  1996-07-16  |  2.1 KB  |  75 lines

  1. #
  2. # Hershey regular fonts - in IRIT format.
  3. #
  4.  
  5. iritState("EchoSource", false);
  6.  
  7. ptXY = function(x, y):
  8.     return = point( x, y, 0.0 );
  9. PLCurve = function(Pts):
  10.     return = poly( Pts, true );
  11.  
  12. include("hersh-09.irt");
  13. include("hershazu.irt");
  14. include("hershazl.irt");
  15. include("hershsim.irt");
  16.  
  17. HersheyFont = list(
  18.     0.0,            0.0,            0.0,
  19.     hersheyNumSign,        hersheyDollar,        0.0,
  20.     hersheyAnd,        0.0,            hersheyOParen,
  21.     hersheyCParen,        hersheyStar,        hersheyPlus,
  22.     hersheyComma,        0.0,            hersheyDot,
  23.     hersheySlash,        hershey0,        hershey1,
  24.     hershey2,        hershey3,        hershey4,
  25.     hershey5,        hershey6,        hershey7,
  26.     hershey8,        hershey9,        hersheyColon,
  27.     hersheySemiColon,    0.0,            hersheyEqual,
  28.     0.0,            hersheyQuestion,    0.0,
  29.     hersheyA,        hersheyB,        hersheyC,
  30.     hersheyD,        hersheyE,        hersheyF,
  31.     hersheyG,        hersheyH,        hersheyI,
  32.     hersheyJ,        hersheyK,        hersheyL,
  33.     hersheyM,        hersheyN,        hersheyO,
  34.     hersheyP,        hersheyQ,        hersheyR,
  35.     hersheyS,        hersheyT,        hersheyU,
  36.     hersheyV,        hersheyW,        hersheyX,
  37.     hersheyY,        hersheyZ,        0.0,
  38.     0.0,            0.0,            0.0,
  39.     0.0,            0.0    ,        hersheyAs,
  40.     hersheyBs,        hersheyCs,        hersheyDs,
  41.     hersheyEs,        hersheyFs,        hersheyGs,
  42.     hersheyHs,        hersheyIs,        hersheyJs,
  43.     hersheyKs,        hersheyLs,        hersheyMs,
  44.     hersheyNs,        hersheyOs,        hersheyPs,
  45.     hersheyQs,        hersheyRs,        hersheySs,
  46.     hersheyTs,        hersheyUs,        hersheyVs,
  47.     hersheyWs,        hersheyXs,        hersheyYs,
  48.     hersheyZs,        0.0,            hersheyVBar,
  49.     0.0,            0.0 ) * sc( 0.05 );
  50.  
  51. save("hersheyRegFont", HersheyFont);
  52.  
  53. iritState("EchoSource", true);
  54.  
  55. hersheyString = function( Str, Spacing, Scaling ): I : Char :
  56.     return = nil():
  57.  
  58.     for ( I = 0, 1, sizeof( Str ) - 1,
  59.     Char = nth( hersheyFont, coord( Str, I ) - 31 ):
  60.     if ( thisobj("Char") == list_type,
  61.         snoc( Char * sc( Scaling ) * tx( Spacing * Scaling * I ),
  62.           return ) ) );
  63.  
  64. UStr = hersheyString( "ABCDEFGHIJKLMNOPQRSTUVWXYZ", 1, 0.07 )
  65.                         * tx( -0.9 ) * ty(  0.6 );
  66. VStr = hersheyString( "abcdefghijklmnopqrstuvwxyz", 1, 0.07 )
  67.                         * tx( -0.9 ) * ty(  0.2 );
  68. GStr = hersheyString( "`1234567890_+~!@#$%^&*()_+", 1, 0.07 )
  69.                         * tx( -0.9 ) * ty( -0.2);
  70. HStr = hersheyString( "{}|:\"<>?[]\\,./", 1, 0.07 )
  71.                         * tx( -0.9 ) * ty( -0.6 );
  72. view_mat = rotx( 0 );
  73. interact( list( view_mat, UStr, VStr, GStr, HStr ) );
  74.  
  75.